<!DOCTYPE html>
<html lang="<%= I18n.locale %>">
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <base target="_top">
  <title>Redirecting…</title>

  <%
    is_iframe = local_assigns.key?(:is_iframe) ? is_iframe : true
    if is_iframe
  %>
  <meta name="shopify-api-key" content="<%= ShopifyApp.configuration.api_key %>">
  <%= javascript_include_tag "https://cdn.shopify.com/shopifycloud/app-bridge.js" %>
  <% end %>

  <%= javascript_include_tag('shopify_app/redirect', crossorigin: 'anonymous', integrity: true) %>
</head>
<body>
  <%=
  content_tag(:div, nil,
    id: 'redirection-target',
    data: {
      target: {
        myshopifyUrl: "https://#{current_shopify_domain}",
        url: url,
      },
    },
  )
  %>
</body>
</html>
